package com.foreknow.elm.controller;

import com.foreknow.elm.po.Business;
import com.foreknow.elm.service.BusinessService;
import com.foreknow.elm.service.impl.BusinessServiceImpl;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class BusinessController {
    public Object listBusinessByOrderTypeId(HttpServletRequest request) {
        //获取前台请求参数 /BusinessController/listBusinessByOrderTypeId?orderTypeId=1
        Integer orderTypeId =Integer.parseInt(request.getParameter("orderTypeId")) ;
        BusinessService businessService = new BusinessServiceImpl();
        List<Business> list = businessService.listBusinessByOrderTypeId(orderTypeId);
        return list;
    }
}
